


/**
* ${classInfo.classComment}
* @author ${authorName}
* @date ${.now?string('yyyy/MM/dd')}
*/

@Slf4j
@RestController
@RequestMapping("/api/budget/${classInfo.className?uncap_first}")
public class ${classInfo.className}Controller {
@Resource
private I${classInfo.className}Service ${classInfo.className?uncap_first}Service;

/**
*${classInfo.classComment}新增(支持批量)
*/
@PostMapping(value = "/creation", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "新增(支持批量)")
public DefaultResponse creation(@RequestBody @Validated ${classInfo.className}ListForm form) {
${classInfo.className?uncap_first}Service.creation(form);
return DefaultResponse.success();
}

/**
*${classInfo.classComment}修改(支持批量)
*/
@PostMapping(value = "/update", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "修改(支持批量)")
public DefaultResponse update(@RequestBody @Validated  ${classInfo.className}ListForm form) {
${classInfo.className?uncap_first}Service.update(form);
return DefaultResponse.success();
}

/**
*${classInfo.classComment}查询
*/
@CustomConditionApi
@PostMapping(value = "/query", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "查询")
public DefaultResponse<PaginationInfo<${classInfo.className}Dto>> query(@RequestBody @Validated ${classInfo.className}PageForm form) {
return DefaultResponse.success( ${classInfo.className?uncap_first}Service.query(form));
}

/**
*${classInfo.classComment}查询不分页
*/
@CustomConditionApi
@PostMapping(value = "/queryList", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "查询不分页")
public DefaultResponse<List<${classInfo.className}Dto>> queryList(@RequestBody @Validated ${classInfo.className}PageForm form) {
return DefaultResponse.success( ${classInfo.className?uncap_first}Service.queryList(form));
}

/**
*${classInfo.classComment}删除
*/
@PostMapping(value = "/delete", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "删除")
public DefaultResponse delete(@RequestBody @Validated Long id) {
${classInfo.className?uncap_first}Service.delete(id);
return DefaultResponse.success();
}

/**
*${classInfo.classComment}详情
*/
@PostMapping(value = "/detail", produces = "application/json; charset=UTF-8")
@ApiOperation(value = "详情")
public DefaultResponse<${classInfo.className}Dto> detail(@RequestBody @Validated Long id) {
return DefaultResponse.success(${classInfo.className?uncap_first}Service.detail(id));
}

}
